//获取应用实例
// const app = getApp()
import{request} from  "../../request/index.js"
Page({

  /**
   * 页面的初始数据
   */
  data: {
    swiperList:[
      {url:"/pages/goods_detail/index",id:"1",src:"http://m.360buyimg.com/mobilecms/s700x280_jfs/t1/119737/8/7620/138855/5ed4f258E90fb6429/49d9e37f3c308323.jpg!cr_1125x445_0_171!q70.jpg.dpg"},
      {url:"/pages/goods_detail/index",id:"2",src:"http://m.360buyimg.com/mobilecms/s700x280_jfs/t1/123231/28/4331/87965/5edc80cdE8a208cd0/4938dce9d228a9ec.jpg!q70.jpg.dpg"},
      {url:"/pages/goods_detail/index",id:"3",src:"http://m.360buyimg.com/mobilecms/s700x280_jfs/t1/123231/28/4331/87965/5edc80cdE8a208cd0/4938dce9d228a9ec.jpg!q70.jpg.dpg"},
    ],
    cateList:[
      {url:"/pages/category/index",id:"1",src:"//m.360buyimg.com/mobilecms/s120x120_jfs/t1/90907/33/16508/7338/5e7cd12fE18b7f28c/62495feb17944a2c.png",name:"超市"},
      {url:"/pages/category/index",id:"2",src:"//m.360buyimg.com/mobilecms/s120x120_jfs/t1/95626/6/16650/5992/5e7d5fdeE251a8742/d29fcc84ee0211f7.png",name:"数码电器"},
      {url:"/pages/category/index",id:"3",src:"//m.360buyimg.com/mobilecms/s120x120_jfs/t1/86437/25/16675/6585/5e7d62e4E1095d733/d0d685ed0477d268.png",name:"9.9拼购"},
      {url:"/pages/category/index",id:"4",src:"//m.360buyimg.com/mobilecms/s120x120_jfs/t1/96795/33/16662/4749/5e7d6385Ec31e4b29/f36c778122286405.png",name:"赚钱"},
    ],
    floorList:[
      {
        floorname:{
          id:"1",
          url:"http://m.360buyimg.com/mobilecms/s750x80_jfs/t1/125636/34/3512/35691/5ed3d508E5b744894/d236d4133e46c8e9.png!q70.jpg.dpg"
        },
        floorimg:[
          {
            id:"1",
            url:"/pages/goods_list/index",
            src:"//m.360buyimg.com/mobilecms/s150x150_jfs/t1/134834/29/1462/118837/5ed8e025E12c75d5d/fe6bd8c5f32bdb6c.jpg!q70.jpg.dpg",
          },
          {
            id:"2",
            url:"/pages/goods_list/index",
            src:"//m.360buyimg.com/mobilecms/s150x150_jfs/t1/134834/29/1462/118837/5ed8e025E12c75d5d/fe6bd8c5f32bdb6c.jpg!q70.jpg.dpg",
          },
          {
            id:"3",
            url:"/pages/goods_list/index",
            src:"//m.360buyimg.com/mobilecms/s150x150_jfs/t1/1465/18/11296/136446/5bce93caE7a85bf7b/abf11de4cd6f5503.jpg!q70.jpg.dpg",
          },
          {
            id:"4",
            url:"/pages/goods_list/index",
            src:"//m.360buyimg.com/mobilecms/s150x150_jfs/t1/75300/31/13658/33045/5daeb773Ebbbd91bd/47a1bdf9047ed568.jpg!q70.jpg.dpg",
          },
          {
            id:"5",
            url:"/pages/goods_list/index",
            src:"//m.360buyimg.com/n1/s150x150_jfs/t29566/227/1464891645/10350/a5b133e2/5ce20cdcNd9cdd972.jpg!q70.jpg.dpg",
          },
          {
            id:"6",
            url:"/pages/goods_list/index",
            src:"//m.360buyimg.com/mobilecms/s150x150_jfs/t1/48374/7/7720/163046/5d56b541E46b72355/478497a6ac85569a.jpg!q70.jpg.dpg",
          },
        ]
      },
      {
        floorname:{
          id:"2",
          url:"//m.360buyimg.com/mobilecms/s750x80_jfs/t1/111304/19/8849/43966/5ed3d4f9E9285323f/e4d90c1a02f138af.png!q70.jpg.dpg"
        },
        floorimg:[
          {
            id:"1",
            url:"/pages/goods_list/index",
            src:"https://wqimg.jd.com/imgproxy/n7/s150x150_jfs/t1/131045/13/948/46896/5ed38bf9Ee48af828/ef99fc012c217d44.jpg.dpg",
          },
          {
            id:"2",
            url:"/pages/goods_list/index",
            src:"//gw.alicdn.com/imgextra/i3/6000000007201/TB2MmSxsbwrBKNjSZPcXXXpapXa_!!6000000007201-0-at.jpg_230x10000Q75.jpg",
          },
          {
            id:"3",
            url:"/pages/goods_list/index",
            src:"//m.360buyimg.com/mobilecms/s150x150_jfs/t1/135965/15/1562/245738/5eda148bE63f6acf7/19febae65838890b.jpg!q70.jpg.dpg",
          },
          {
            id:"4",
            url:"/pages/goods_list/index",
            src:"//m.360buyimg.com/mobilecms/s150x150_jfs/t1/100430/19/5671/35161/5def3b36Eda0d4e24/cae78ce556a995c7.png!q70.jpg.dpg",
          },
          {
            id:"5",
            url:"/pages/goods_list/index",
            src:"//m.360buyimg.com/mobilecms/s150x150_jfs/t1/85072/25/5818/20921/5def3796Eeb18104b/fed4740b6b58d144.jpg!q70.jpg.dpg",
          },
          {
            id:"6",
            url:"/pages/goods_list/index",
            src:"//gw.alicdn.com/imgextra/i2/2509849149/O1CN01KjMoBj2HSICylpvio_!!2509849149.jpg_230x10000Q75.jpg",
          },
        ]
      }
    ],
    // 为你推荐 
    src:"//img11.360buyimg.com/jdphoto/jfs/t1/31601/22/15554/14040/5cc2a86fEbdb1098b/88174b36f85283b6.png",
    recommendList:[
      {
        id:"1",
        url:"/pages/goods_detail/index",
        src:"//gw.alicdn.com/imgextra/i2/2509849149/O1CN01KjMoBj2HSICylpvio_!!2509849149.jpg_230x10000Q75.jpg",
        content:"DOSERMO丹西摩奢侈品时尚男装夏季新款短袖T恤动物玫瑰刺绣宽松圆领半袖打底衫潮060212756 黑色 48",
        html:'<p class="similar-product-info"><span class="similar-product-price">¥&nbsp;<span class="big-price">1090</span></span><span class="rec-price-tag">闪购</span><span data-event_id="MHomeGuessYouLike_BSimilarities" nowxa="1" data-event_level="1" data-event_param="1_50976512615_1" class="guess-button j_see_similar" jump-href="//home.m.jd.com/myjd/similar/list.action?skuId=50976512615">看相似</span></p>'
      },
      {
        id:"2",
        url:"/pages/goods_detail/index",
        src:"//img13.360buyimg.com/mobilecms/s372x372_jfs/t1/88636/17/14004/249915/5e5c9153E3d15f620/5c58d1ee342e7bb4.jpg!q70.dpg.dpg",
        content:"蒙牛 特仑苏 低脂牛奶 250ml*12 礼盒装（新老包装随机发货）",
        html:'<p class="similar-product-info"><span class="similar-product-price">¥&nbsp;<span class="big-price">1090</span></span><span class="rec-price-tag">闪购</span><span data-event_id="MHomeGuessYouLike_BSimilarities" nowxa="1" data-event_level="1" data-event_param="1_50976512615_1" class="guess-button j_see_similar" jump-href="//home.m.jd.com/myjd/similar/list.action?skuId=50976512615">看相似</span></p>'
      },
      {
        id:"3",
        url:"/pages/goods_detail/index",
        src:"//img14.360buyimg.com/mobilecms/s372x372_jfs/t1/138073/15/67/156656/5edb5c35E13c0fc69/c55f60f85bab4509.jpg!q70.dpg.dpg",
        content:"天梭(TISSOT)瑞士手表 力洛克系列皮带机械男士手表T006.407.16.033.00 新款",
        html:'<p class="similar-product-info"><span class="similar-product-price">¥&nbsp;<span class="big-price">1090</span></span><span class="rec-price-tag">闪购</span><span data-event_id="MHomeGuessYouLike_BSimilarities" nowxa="1" data-event_level="1" data-event_param="1_50976512615_1" class="guess-button j_see_similar" jump-href="//home.m.jd.com/myjd/similar/list.action?skuId=50976512615">看相似</span></p>'
      },
      {
        id:"4",
        url:"/pages/goods_detail/index",
        src:"//img12.360buyimg.com/mobilecms/s372x372_jfs/t1/132271/18/1456/160705/5ed8e1e2E688d4def/456d3576ff4983dd.jpg!q70.dpg.dpg",
        content:"Apple iPhone XS Max (A2104) 64GB 深空灰色 移动联通电信4G手机 双卡双待",
        html:'<p class="similar-product-info"><span class="similar-product-price">¥&nbsp;<span class="big-price">1090</span></span><span class="rec-price-tag">闪购</span><span data-event_id="MHomeGuessYouLike_BSimilarities" nowxa="1" data-event_level="1" data-event_param="1_50976512615_1" class="guess-button j_see_similar" jump-href="//home.m.jd.com/myjd/similar/list.action?skuId=50976512615">看相似</span></p>'
      },
    ]
  },
// 
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    console.log("wx.request获取轮播图")
    // wx.request({
    //   url: 'https://www.baidu.com',
    //   success: (result) => {
    //     console.log(result)
    //     this.setData({
    //       swiperList:result.data.swiperList
    //     })
    //   },
    // })
    // 封装后的代码
    // request({url:"/request"}).then(result => {
    //   this.setData({
    //     swiperList:result.data.swiperList
    //   })
    // })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
    
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {
    
  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {
    
  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
    
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {
    
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
    
  }
})
